Delete folder without contents

Hello together,

I want to delete a folder but without the contents.


sa14 - Tue Jan 27 04:30:36 EST 2015

Re: Delete folder without contents
Mike.Scharnow - Tue Jan 27 04:45:51 EST 2015

Hi!

please specify what you mean by that. I assume that by "contents" you mean the formal and link modules and the folders and projects that reside in the folder to be deleted.

What shall happen with them? Like when you delete a Windows directory - what shall happen with the files residing inside?

Re: Delete folder without contents
Mike.Scharnow - Tue Jan 27 06:22:54 EST 2015

As you do it with DXL, there's not really a need to copy the folder in the first place.

So, instead of copying the folder strSrc to strDest you could use a loop like ... Item i; for i in folder strSrc do { /* copy item strSrc"/" (name i) to folder strDest */ }

Alternatively, after the copying you would have to move the objects one level up before deleting the folder (Item i; for i in folder strDest"/"strSrc do { /* move item strDest"/"strSrc"/" (name i) to folder strDest */ }